Superword Level Parallelism (SLP) is a vector parallelism exploration approach for basic block. With loop unrolling, more parallel possibility can be explored. Simultaneously too much exploring paths are brought in. In order to solve the above problem, an optimized SLP method with subsection constraints was proposed. Redundant elimination on segmentation was used to obtain homogeneous segments. Inter-section exploring method based on SLP was used to restrain exploring paths and reduce the complexity of the algorithm. And finally pack adjustment was used to deal with the situation of overlap on memory access. The experimental results show that the vectorization capability of SLP is enhanced; for the test serial program, the average speedup of vectorized version is close to 2.
A fast border-detection algorithm named local border search algorithm was presented here, and applied to an on-line surface inspection system for cold rolled strips. Based on the last search result, a local search was used to position the cold rolled strip border and increased the algorithms speed greatly. Test with images collected from real world data shows that local border search algorithm is about 20 to 200 times faster than the traditional gray level gradient threshold algorithm, and can detect borders more accurately. The algorithm can also be used in the search of other image border.